From 15542fcd1c9a42c551377b4ce2d44284f7340462 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 20 Oct 2010 08:40:44 +0100 Subject: [PATCH] msi: Mask out multi-function flag from PCI_HEADER_TYPE in read_pci_mem_bar() This leads to an erroneous WARN_ON and possibly other side effects. It seems to me that even multi-function devices ought to enjoy the privilege of MSI-X capabilities. Signed-off-by: Gianni Tedesco --- xen/arch/x86/msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 2b8f94c993..88f3a3707d 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -527,7 +527,7 @@ static u64 read_pci_mem_bar(u8 bus, u8 slot, u8 func, u8 bir) u8 limit; u32 addr; - switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) ) + switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) & 0x7f ) { case PCI_HEADER_TYPE_NORMAL: limit = 6; -- 2.30.2